package com.magicode.screen.react.activity;

import android.os.Bundle;

import com.facebook.react.ReactRootView;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
import com.magicode.screen.AppContext;

import javax.annotation.Nullable;

/**
 * 收藏界面
 *
 * @author kymjs (http://www.kymjs.com/)
 */
public class PaySuccessReactActivity extends MgcReactActivity implements DefaultHardwareBackBtnHandler {
    private ReactRootView mReactRootView;
    private String userId = AppContext.getInstance().getLoginUid();
    private String activityName = "paySuccess";

    @Override
    protected String getMainComponentName() {
        return "paySuccess";
    }

    protected @Nullable
    Bundle getLaunchOptions() {
        Bundle bundle=new Bundle();
        bundle.putString("userId",userId);
        bundle.putString("activityName",activityName);
        return bundle;
    }

    @Override
    protected void onResume() {
        super.onResume();
        if(mReactInstanceManager != null) {
            WritableMap params = Arguments.createMap();
            params.putBoolean("refresh", true);
            sendEvent(mReactInstanceManager.getCurrentReactContext(), "refreshList", params);
        }
    }
    @Override
    public void onBackPressed() {
        super.onBackPressed();
    }
}
